<%#
# To change this template, choose Tools | Templates
# and open the template in the editor.
%>

<tr>
  <td width="100%" colspan="5">
<%  form_remote_tag(:url => { :action => "finalize_ingredient", :id => @ing_count}, :update => "ingredient") do %>
    <table  border="1" width ="500px" bgcolor="#FFF6BF">
      <tr>
        <td width="20%"><%= text_field_tag 'name', edit_ingredient_row[:name] %></td>
        <td width="15%"><%= text_field_tag 'amount', edit_ingredient_row[:amount]   %></td>
        <td width="15%"><%= text_field_tag 'amount_unit', edit_ingredient_row[:amount_unit] %></td>
        <td width="35%"><%= text_field_tag 'notes', edit_ingredient_row[:notes] %></td>
        <td width="15%">
        <%# AJAX Call for Submit Button %>
           <%= hidden_field_tag  :id, :value => @ing_count %>
              <%= submit_tag "Save" %>
           <% end %>
        <%# AJAX Call for cancel Button %>
           <% form_remote_tag :url => {:action => "cancel_edit_ingredient"} do %>
              <%= submit_tag "Cancel" %>
           <% end %>
        <%# AJAX Call for Remove Button %>
           <% form_remote_tag :url => {:action => "destroy_current_ingredient", :id=>@ing_count} do %>
              <%= submit_tag "Remove",:confirm => 'Are you sure?' %>
           <% end %>
        </td>
     </tr>
    </table>
   </td>
</tr>
